package cn.btks.commonserver.result;


/**
 * Created by zhangjing on 2019/12/13.
 */
public enum StateInfo {

    LOGIN_OK("2000", "登陆成功!"),
    LOGIN_ERROR("2001", "登陆无效，请尝试重新登陆！"),
    LOGIN_NULL("2002", "登陆过期，请尝试重新登录!"),
    LOGIN_USER_ERROR("2003", "用户名或者密码输入错误,请重新输入！"),
    Login_auth_Error("2004", "无该功能授权，请联系管理员"),
    Auth_Null("2005","你未参与过此项目"),
    LOGIN_LOCKED("2006","账户被锁定,请联系管理员！"),
    CREDENTIALS_EXPIRED("2007","密码过期,请联系管理员！"),
    ACCOUNT_EXPIRED("2008","账户过期,请联系管理员！"),
    ACCOUNT_DISABLED("2009","账户被禁用,请联管理员！"),

    PASSWORD_UPDATE_OK("2010","密码修改成功"),
    PASSWORD_UPDATE_ERROR("2011","密码修改失败"),
    PASSWORD_UPDATE_ERROR1("2012","原密码填写错误"),
    PASSWORD_UPDATE_ERROR2("2013","该用户不存在"),

    TOKEN_ERROR("2021","解析token，请查看账户信息是否过期"),


    Parameter_Passing_Error("9001","参数传递异常"),
    Upload_File_Exception("9003","上传文件大小超出限制！"),
    Upload_File_OK("9000","文件上传成功"),
    Upload_File_ERROR("9002","文件上传失败"),
    Duplicate_Key_Exception("5001","数据库关键字冲突异常,操作失败！"),
    Data_Integrity_Violation_Exception("5002","该数据有关联数据,操作失败！"),
    Data_Access_Exception("5000","数据库异常,操作失败！"),
    Bind_Exception("4006",""),

    FIND_OK("3000", "查询成功"),
    FIND_ERROR("3001", "查询失败"),
    FIND_ERROR1("3003", "请输入正确的授权码"),
    FIND_NULL("3002", "未查询到数据"),


    SAVE_OK("6000", "保存成功"),
    SAVE_OK1("6001", "上报成功"),
    SAVE_ERROR("6004", "保存失败"),
    SAVE_ERROR1("6005", "该信息不存在，无法进行更新"),
    SAVE_ERROR2("6006", "数据中包含未存在的数据，无法更新"),
    SAVE_ERROR3("6007", "保存失败，该角色编码已经存在"),
    SAVE_ERROR4("6008", "保存失败，该用户用户名已经存在"),
    SAVE_ERROR11("6015", "该用户无权限进行此操作"),
    SAVE_ERROR12("6016", "授权码已经失效，请咨询管理员重新获取"),
    SAVE_ERROR_BACKUP_1("6017", "该备份配置名称已存在"),
    SAVE_VERIFY_OK("6060","审核成功"),
    SAVE_VERIFY_ERROR("6061","审核失败"),
    ZIP_OK("6070","打包成功"),
    ZIP_ERROR("6071","打包失败"),
    FILE_EXIST_ERROR("6081","该矢量文件已经存在，请勿重复上传"),

    START_RESUME_OK("8000","备份恢复成功"),
    START_RESUME_ERROR("8001","备份恢复失败"),

    DELETE_OK("4000", "删除成功"),
    DELETE_ERROR("4001", "删除失败"),
    DELETE_ERROR_1("4002", "删除失败，文件不存在!"),
    DELETE_ERROR_2("4003", "删除失败，该信息不存在!"),
    DELETE_ERROR_3("4004", "删除失败，该信息被引用，无法删除!"),

    DELETE_ERROR_9("9000", "其他错误！"),

    START_OK("7000","备份启动成功"),
    START_ERROR("7001","备份启动失败"),
    PAUSE_OK("7000","备份暂停成功"),
    PAUSE_ERROR("7001","备份暂停失败"),


    DOWNLOAD_OK("7000","下载成功"),
    DOWNLOAD_ERROR("7001","下载失败");

    private String msg;
    private String code;

    StateInfo(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getMsg() {
        return msg;
    }

    public String getCode() {
        return code;
    }

}
